//
//  Date.swift
//  ss-2t-ios-app
//
//  Created by 胡秋生 on 2019/6/3.
//  Copyright © 2019 胡秋生. All rights reserved.
//

import Foundation
extension Date {
    //MARK: 获取当前 秒级 时间戳 - 10位
   public var timeStamp : Int {
        let timeInterval: TimeInterval = self.timeIntervalSince1970
        return Int(timeInterval)
    }
    
    //MARK: 获取当前 毫秒级 时间戳 - 13位
    public var milliStamp : CLongLong {
        let timeInterval: TimeInterval = self.timeIntervalSince1970
        return CLongLong(round(timeInterval*1000))
    }
}
